<template xmlns="http://www.w3.org/1999/html">
    <sea-data-table ref="tableObject" url="/resource/mapping/page">
        <!--表头-->
        <smart-table-header slot="header">
            <!--标题栏-->
            <sea-page-title slot="title" title="标题栏" subtitle=""></sea-page-title>

            <!--输入-->
            <template slot="input">
                <smart-form-layout require name="keyword" label="关键字" :span="6">
                    <smart-text-view name="keyword" placeholder="中/英"></smart-text-view>
                </smart-form-layout>
            </template>

            <!--按钮栏-->
            <template slot="buttons">
                <el-button plain size="small" title="新增" icon="fa fa-plus" @click="onAction('new')"></el-button>
            </template>
        </smart-table-header>

        <!-- 弹窗、抽屉 -->
        <template slot="drawer">
        </template>

        <!--表头-->
        <template slot="columns">
        <#list columns as column>
            <sea-column type="def" property="${column.camelName}" label="${column.columnComment}" width="180"></sea-column>
        </#list>

            <!--操作栏-->
            <sea-table-actionbar width="180" :on-action="onAction" :buttons="buttons"></sea-table-actionbar>
        </template>
    </sea-data-table>
</template>

<script>

export default {
    components: {
    },
    methods: {
        /**
         * 操作栏事件分发
         * @param evt 事件
         * @param row 行级对象
         */
        onAction: function (evt, row) {
        }
    },
    data() {
        return {
            // 操作栏
            buttons: [
                {evt: 'edit', type: 'btn', label: '控制面板'}
            ]
            // end--
        }
    }
}
</script>


